From 0af580cdd5809557b846022c2e790e6825127d8e Mon Sep 17 00:00:00 2001 From: Wei Liu Date: Thu, 4 Oct 2018 16:43:24 +0100 Subject: [PATCH] x86: make x86_64/traps.c build with !CONFIG_PV Provide declarations for hypercall_page_initialise_ring*_kernel, make sure DCE work as expected. Signed-off-by: Wei Liu Acked-by: Jan Beulich --- xen/arch/x86/x86_64/traps.c | 6 ++++-- xen/include/asm-x86/hypercall.h | 3 ++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/xen/arch/x86/x86_64/traps.c b/xen/arch/x86/x86_64/traps.c index afe539ff1d..27154f2ae2 100644 --- a/xen/arch/x86/x86_64/traps.c +++ b/xen/arch/x86/x86_64/traps.c @@ -354,10 +354,12 @@ void hypercall_page_initialise(struct domain *d, void *hypercall_page) memset(hypercall_page, 0xCC, PAGE_SIZE); if ( is_hvm_domain(d) ) hvm_hypercall_page_initialise(d, hypercall_page); - else if ( !is_pv_32bit_domain(d) ) + else if ( is_pv_64bit_domain(d) ) hypercall_page_initialise_ring3_kernel(hypercall_page); - else + else if ( is_pv_32bit_domain(d) ) hypercall_page_initialise_ring1_kernel(hypercall_page); + else + ASSERT_UNREACHABLE(); } /* diff --git a/xen/include/asm-x86/hypercall.h b/xen/include/asm-x86/hypercall.h index da38b7991c..7f302ecd97 100644 --- a/xen/include/asm-x86/hypercall.h +++ b/xen/include/asm-x86/hypercall.h @@ -28,9 +28,10 @@ extern const hypercall_args_t hypercall_args_table[NR_hypercalls]; #ifdef CONFIG_PV extern const hypercall_table_t pv_hypercall_table[]; void pv_hypercall(struct cpu_user_regs *regs); +#endif + void hypercall_page_initialise_ring3_kernel(void *hypercall_page); void hypercall_page_initialise_ring1_kernel(void *hypercall_page); -#endif /* * Both do_mmuext_op() and do_mmu_update(): -- 2.30.2